﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ViewProdects.aspx.cs" Inherits="IMS_WEB.ViewProdects" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

    .auto-style5 {
        width: 78px;
    }
        .style1
        {}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    选择厂商<asp:TextBox ID="tbCompany" runat="server"></asp:TextBox>
    <ajaxToolkit:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" 
        runat="server" DelimiterCharacters="" Enabled="True" ServicePath="~/WebService.asmx"  ServiceMethod="GetCompanyList"
        TargetControlID="tbCompany" MinimumPrefixLength="1">
    </ajaxToolkit:AutoCompleteExtender>
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </ajaxToolkit:ToolkitScriptManager>
    商品名称<asp:TextBox ID="tbProductName" runat="server"></asp:TextBox>
    <ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" 
        runat="server" DelimiterCharacters="" Enabled="True" ServicePath="~/WebService.asmx"  ServiceMethod="GetProductList"
        TargetControlID="tbProductName" MinimumPrefixLength="1">
    </ajaxToolkit:AutoCompleteExtender>
    <asp:Button ID="btnQuery" runat="server" onclick="btnQuery_Click" Text="查询" />
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" CssClass="style1" Width="620px" 
        AutoGenerateColumns="False" DataKeyNames="index_id,company_id" 
        onrowdatabound="GridView1_RowDataBound" 
        onrowdeleting="GridView1_RowDeleting" 
        onrowediting="GridView1_RowEditing" 
        onrowcancelingedit="GridView1_RowCancelingEdit" 
        onrowupdating="GridView1_RowUpdating">
        <Columns>
            <asp:BoundField DataField="index_id" HeaderText="index_id" ReadOnly="True" 
                SortExpression="index_id" Visible="False" />
            <asp:BoundField DataField="product_code" HeaderText="商品编码" 
                SortExpression="product_code" >
            <HeaderStyle Width="60px" />
            <ItemStyle Width="60px" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="product_name" HeaderText="商品名称" 
                SortExpression="product_name" >
            <HeaderStyle Width="100px" />
            <ItemStyle Width="100px" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="product_sn" HeaderText="外部编号" />
            <asp:BoundField DataField="product_mainClass" HeaderText="主机编号" />
<asp:BoundField DataField="product_type" HeaderText="规格" SortExpression="product_type"></asp:BoundField>
            <asp:BoundField DataField="product_price" DataFormatString="{0:c}" 
                HeaderText="单价" SortExpression="product_price" >
            <HeaderStyle Width="50px" />
            <ItemStyle Width="50px" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="product_salePrice" HeaderText="售价" 
                SortExpression="product_salePrice" />
            <asp:BoundField DataField="product_unit" HeaderText="单位" 
                SortExpression="product_unit"></asp:BoundField>
            <asp:BoundField DataField="remarks" HeaderText="备注" SortExpression="remarks">
            <HeaderStyle Width="50px" />
            <ItemStyle Width="50px" Wrap="False" />
            <HeaderStyle Width="150px" Wrap="False" />
            <ItemStyle Width="150px" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="company_id" HeaderText="company_id" 
                SortExpression="company_id" Visible="False" />
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="true" />
        </Columns>
    </asp:GridView>
    <br />

    
 
    <br />
<table style="width: 100%;">
    <tr>
        <td align="center" class="auto-style5">
            <asp:Button ID="btnAddProduct" runat="server" style="width: 78px" Text="添加商品" 
                onclick="btnAddProduct_Click" />
        </td>
        <td align="center">
            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/NewProdect.aspx">添加货品</asp:HyperLink>
        </td>
        <td align="center">
            &nbsp;</td>
    </tr>
</table>
</asp:Content>
